﻿#pragma once

// 常量
class Const {
    // 格
    public: static const int GRID_SIZE = 40;                                                    // 尺寸

    // 游戏区域
    public: static const int GAME_BOARD_POINT_COUNT_H = 15;                                     // 横向点数
    public: static const int GAME_BOARD_POINT_COUNT_V = 15;                                     // 纵向点数
    public: static const int GAME_BOARD_WIDTH = (GAME_BOARD_POINT_COUNT_H + 1) * GRID_SIZE;     // 宽度
    public: static const int GAME_BOARD_HEIGHT = (GAME_BOARD_POINT_COUNT_V + 1) * GRID_SIZE;    // 高度
    public: static const COLORREF GAME_BOARD_COLOR = RGB(128, 128, 192);                        // 背景色
    public: static const COLORREF GAME_BOARD_BORDER_COLOR = RGB(0, 0, 0);                       // 线颜色

    // 胜利数
    public: static const int WIN_NUMBER = 5;                                                    // 达到此数胜利

    // 棋子
    public: static const int PIECE_RADIUS = GRID_SIZE * 4 / 10;                                 // 半径

    // 事件
    public: static const int UM_GAME_OVER = WM_USER + 1;                                        // 游戏结束事件
    public: static const int UM_GAME_START = WM_USER + 2;                                       // 游戏开始事件
    public: static const int UM_GET_FIND_USERS_RESULT = WM_USER + 3;                            // 得到寻找用户结果事件
    public: static const int UM_GET_INVITE_REQUEST = WM_USER + 4;                               // 得到挑战请求事件
    public: static const int UM_GET_INVITE_RESULT = WM_USER + 5;                                // 得到挑战结果事件
    public: static const int UM_GET_LOGON_RESULT = WM_USER + 6;                                 // 得到登录结果事件
    public: static const int UM_GET_RIVAL_NAME = WM_USER + 7;                                   // 得到对手的名字事件
    public: static const int UM_RIVAL_QUIT_GAME = WM_USER + 8;                                  // 对手退出游戏事件
};
